#ifndef MULTIFIT_H_
#define MULTIFIT_H_

#include <gsl/gsl_multifit.h>

namespace RPI_GSL
{

class Multifit
{
	gsl_matrix *X;  // the predictor variables
	gsl_vector *y;  // the observations
	gsl_matrix *cov;
    gsl_vector *c;
    gsl_multifit_linear_workspace * work;
	double *p; // parameters for a planar model
	int n; // number of observations
	int t; // number of parameters including the constant
	
public:
	Multifit(int nn, int tt); // set n and t and required data structures
	void solve(double *yy, double *xx);
	double *getp(void) { return p; }
	virtual ~Multifit();
};

}

#endif /*MULTIFIT_H_*/
